---
id: "get-decorator"
keywords: ["get", "decorator"]
name: "@get"
summary: "This is the `@get` decorator."
category: "decorators"
---

The `@get` decorator is used to bind to a property of an object.

### Example

<CodeTab labels={["ReScript", "JS Output"]}>

```res
type window
@val external window: window = "window"
@get external getName: window => string = "name"

let name = getName(window)
```

```js
var name = window.name;
```

</CodeTab>

### References

- [Bind Using Special Getter and Setter Attributes](../docs/manual/bind-to-js-object.mdx#bind-using-special-getter-and-setter-attributes)
